package cate.common.table.res.adventuretask;

import cate.common.table.ESheet;
import cate.common.util.random.RWList;

public class AdventureTaskGroupWeightSheet extends ESheet<AdventureTaskGroupWeightRow> {
    public RWList<AdventureTaskGroupWeightRow> groupMap = new RWList<>();

    @Override
    public String getSheetName() {
        return "任务组权重";
    }

    @Override
    public void onLoaded() {
        groupMap.clear();
        for (AdventureTaskGroupWeightRow group : this.getList()) {
            groupMap.add(group);
        }
        groupMap.setup();
    }

    public int randomGroup() {
        return groupMap.get().group;
    }
}
